/*
 * @Author: Leander 
 * @Date: 2019-03-02 02:17:15 
 * @Last Modified by: Leander
 * @Last Modified time: 2019-03-03 15:55:25
 */

import * as types from './mutations-types'
import { localStorage, sessionStorage } from '@/common/storage'

//state数据的修改操作
//引入mutation-types.js 操作里面定义的常用变量
const mutation = {
  [types.SET_PROGRESS](state, progress) {
    console.info(store, progress)
    state.progress = progress || 0
    if (progress === null) {
      localStorage.remove('progress')
    } else {
      localStorage.set('progress', progress)
    }
  }
}

export default mutation
